<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!-- 
items=数据总条数
index=分页标明展现格式；"center", "forward" or "half-full".
maxPageItems=每页最大展现行数； 
maxIndexPages=每页最大可选页数；
isOffset=数据是否展现；
scope=参数作用范围；
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>上下班登记记录</title>

</head>


<body topmargin='10' leftmargin='10' rightmargin='10' bottommargin='10'>
	<table width='100%' height='100%' border='0' cellspacing='1'
		cellpadding='0' align=center bgcolor='#9BBCFF'>
		<tr>
			<td width='100%' colspan='2' bgcolor='#ffffff' valign=top>
				<table width='100%' height='100%' border='0' cellspacing='0'
					cellpadding='0'>
					<tr>
						<td valign='top'>
							<table width='100%' border='0' cellspacing='0' cellpadding='0'>
								<tr>
									<td height='25' background='titlebg.gif'>&nbsp;
										&nbsp;上下班登记记录</td>
								</tr>
							</table>

							<table width='100%' border='1' cellspacing='0' cellpadding='3'
								bordercolor="#dddddd">
								<tr bgcolor='#f9f9f9'>
									<td><div align='center'>日期</div></td>
									<td><div align='center'>上午上班</div></td>
									<td><div align='center'>上午下班</div></td>
									<td><div align='center'>下午上班</div></td>
									<td><div align='center'>下午下班</div></td>
								</tr>
								<s:set name="count" value="list.size()"></s:set>
								<s:if test="#count==0">
									<tr>
										<td colspan="5"><font color="red">暂无数据记录!</font></td>
									</tr>
								</s:if>
								<s:else>

									<s:iterator value="list" var="record">
										<tr>
											<td align="center"><s:date
													name="#record.workRegisterDate" format="yyyy-MM-dd" var="d" />
												<s:property value="#d" /></td>
											<td align="center"><s:date name="#record.onDutyTimeA"
													format="HH:mm:ss" var="da" /> <s:property value="#da" /></td>
											<td align="center"><s:date name="#record.offDutyTimeA"
													format="HH:mm:ss" var="fa" /> <s:property value="#fa" /></td>
											<td align="center"><s:date name="#record.onDutyTimeP"
													format="HH:mm:ss" var="dp" /> <s:property value="#dp" /></td>
											<td align="center"><s:date name="#record.offDutyTimeP"
													format="HH:mm:ss" var="fp" /> <s:property value="#fp" /></td>
										</tr>

									</s:iterator>
									<tr>
										<td colspan="5" align="center"><pg:pager scope="request" maxIndexPages="5"
												index="center" url="workRecord" items="${cus.total}"
												export="currentPageNumber=pageNumber">
												<pg:first>
													<a href="${pageUrl}">首页</a>
												</pg:first>
												<pg:prev>
													<a href="${pageUrl }">上一页</a>
												</pg:prev>
												<pg:pages>
													<c:choose>
														<c:when test="${currentPageNumber eq pageNumber}">
															<font color="red">${pageNumber }</font>
														</c:when>
														<c:otherwise>
															<a href="${pageUrl }">${pageNumber }</a>
														</c:otherwise>
													</c:choose>
												</pg:pages>
												<pg:next>
													<a href="${pageUrl }">下一页</a>
												</pg:next>
												<pg:last>
													<a href="${pageUrl }">尾页</a>
												</pg:last>
											</pg:pager></td>
									</tr>
								</s:else>

							</table>
						</td>

					</tr>

				</table>
			</td>

		</tr>

	</table>

</body>

</html>
